﻿using DemoWebapi01.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace DemoWebapi01.EntityTypeConfiguration
{
    public class UserETConfig : BaseEntityETConfig<User>
    {
        protected override void ConfigureOtherProperties(EntityTypeBuilder<User> builder)
        {
            builder.Property(e => e.UserName).HasMaxLength(200).IsRequired().HasComment("用户名");
            builder.Property(e => e.Password).HasMaxLength(200).HasComment("密码");
            builder.Property(e => e.Email).HasMaxLength(200).HasComment("邮箱");
            builder.Property(e => e.NickName).HasMaxLength(200).HasComment("昵称");
            builder.Property(e => e.PhoneNumber).HasMaxLength(50).HasComment("手机号");
            builder.Property(e => e.Avatar).HasComment("头像");
        }
    }
}
